﻿/*
    Bisounours Party Updater - Update Source Engine Mods
    Copyright (C) 2012  Louis «Orygin» Geuten and Hekar Khani

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
   
    Bisounours Party Updater  
    Copyright (C) 2012  Louis «Orygin» Geuten and Hekar Khani
    This program comes with ABSOLUTELY NO WARRANTY;
    This is free software, and you are welcome to redistribute it
    under certain conditions;
*/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace bpUpdater
{
    interface Updater
    {
        bool InstallRequired
        {
            get;
        }

        /// <summary>
        /// Is an update required
        /// </summary>
        bool UpdateRequired
        {
            get;
        }

        /// <summary>
        /// Version numbers behind latest version
        /// </summary>
        int Iterations
        {
            get;
        }

        /// <summary>
        /// Version on client's machine
        /// </summary>
        int LocalVersion
        {
            get;
        }

        /// <summary>
        /// Version on server
        /// </summary>
        int ServerVersion
        {
            get;
        }

        /// <summary>
        /// Cleanup the following scenarios
        ///     - Cancellation
        ///     - Extra files
        ///     - Corrupt State
        /// </summary>
        void CleanUp();

        /// <summary>
        /// TODO: REFACTOR THIS HACKY INTERFACE
        /// </summary>
        void RetrieveAndUpdate(bool NeedToClean, string updateUrl, 
            string WorkDir, Logger logger);

        void DeleteFiles();
    }
}
